﻿USE [HR_DB]
GO
if exists(select * from dbo.sysobjects where id = object_id(N'menu')   and   OBJECTPROPERTY(id,   N'IsUserTable')   =   1)   
  drop table menu   
-- =============================================
-- Author:杨洁(kaixuanpisces)
-- Create date: 20090728
-- Description:	菜单表
-- =============================================
CREATE TABLE [dbo].[menu](
	[menu_id] [int] IDENTITY(1,1) NOT NULL,
	[menu_upid] [int] NOT NULL,
	[menu_title] [varchar](60) NOT NULL,
	[menu_src] [varchar](max) NOT NULL,
	[menu_order] [int] NULL,
	[menu_status] [bit] NOT NULL,
	[menu_remark] [varchar](max) NULL,
	[menu_pic] [int] NULL,
 CONSTRAINT [PK_menu] PRIMARY KEY CLUSTERED 
(
	[menu_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO

-- ==============================================
-- 列名说明
-- ==============================================
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'菜单编号,自动增长列' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'menu', @level2type=N'COLUMN',@level2name=N'menu_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上级菜单编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'menu', @level2type=N'COLUMN',@level2name=N'menu_upid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'菜单标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'menu', @level2type=N'COLUMN',@level2name=N'menu_title'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'菜单路径' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'menu', @level2type=N'COLUMN',@level2name=N'menu_src'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'菜单排序字段' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'menu', @level2type=N'COLUMN',@level2name=N'menu_order'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'菜单状态:0无效1有效' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'menu', @level2type=N'COLUMN',@level2name=N'menu_status'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'菜单说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'menu', @level2type=N'COLUMN',@level2name=N'menu_remark'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'菜单图标' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'menu', @level2type=N'COLUMN',@level2name=N'menu_pic'